package leecode

import "strings"

func countVowels(word string) int64 {
	// 包含i的左侧字符串 0 1 2 i 右侧 i , i + 1 len(word)-1
	size := len(word)
	var result int
	for index, str := range word {
		if strings.Contains("aeiou", string(str)) {
			result += (index + 1) * (size - index)
		}
	}
	return int64(result)
}
